<?php

class lib_upload {

    public $input_control_name;
    public $upload_location;

    public function __construct() {
        
    }

    public function upload_file($input_control_name, $upload_location) {
        $name = $_FILES[$input_control_name]['name'];
        $tmp_name = $_FILES[$input_control_name]['tmp_name'];
        $upload_location .= $name;
        move_uploaded_file($tmp_name, $upload_location) or die('Upload file failed!');
        return true;
    }

}
